Node Logic Example

 

Suppose that for safety considerations we desire to keep track of the number of times both forklifts simultaneously enter a particular zone of the network consisting of branches N2 to N3, N3 to N4, and N3 to N5. (It is thought that this zone may be particularly susceptible to accidents due to heavy traffic.) We could accomplish this using node logic at the entry and exit points of the zone.

The only way to enter or exit the zone is through nodes N2 and N5. To track the number of forklifts currently in the zone, we increment and decrement a variable called Current. Each time a forklift leaves node N2 or N5 en-route to node N3 we increment variable Current. Each time a forklift enters node N2 or N5 enroute from N3 we decrement variable Current. Finally, each time we increment the variable Current, we check to see if Current > 1. If so, we increment a second variable called Total to record an occurrence of both forklifts in the zone at the same time.

The following windows show the entry and exit logic for node N2, representing one entry to the zone. The node logic for node N5 is identical to that for node N2.

 

Please note

This example follows the rule that allows the Last() function to be used only in Node Entry Logic, while the Next() function may be used only in Node Exit Logic. (See Resource-Specific System Functions).